# a in 1-332  b in 2-333 c in 1000-a-b
for a in range(1,333):
    for b in range(a+1,500):
        if a ** 2 + b ** 2 == (1000-a-b) ** 2:
            print(a,b,1000-a-b,a*b*(1000-a-b))